home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
UTILREEN
/
BITFNT38.LZH
/
NLQDRAFT.BFC
< prev
next >
Wrap
Text File
|
1987-05-03
|
4KB
|
134 lines
N,"NLQ Printer Draft";
x: df=2; {init data format to 2}
x: xd=2; {double horizontal density}
x: yd=1; {one pass, normal vertical density}
x: to=6;
x: lo=0;
x: cw=11;
x: ch=8;
x: ep=11,"Ending Point";
x: sp=0,"Starting Point";
x: sh=1,"Shift (0=shift down,1=none)";
a: aa=0; {not allow adjacent dots}
a: fw=11;
a: fh=9;
a: bl=6;
a: d8=0; {d8=1 says downloading}
E; {end initialization section.}
KI; {start input font header.}
EI; {end input font header.}
L 8;
j 12:fp,ge,fs; {L12 is end of file reached}
u: zz;
j 8: zz,ne,$1b; {look for esc}
u: zz;
j 8: zz,ne,$26; {look for x'26'}
u: zz;
j 8: zz,ne,$00; {look for 0 }
u: cc; {decimal code of character}
u: cc; {decimal code of character}
L 1; {label 1 to indicate start of character.}
$ : cc,"Loading code (hex) ";
x: df=2; {init data format to 2}
x: pd=2; {double horizontal density}
x: pp=1; {one pass, normal vertical density}
x: cw=11;
x: ch=8;
u: at;{attribute data: bit 0=top offset, 1-3=left offset, 4-7=endpoint}
x: sh=at/128;
x: to=1-sh+6;
x: lo=0;
a: a1=at/16; {get hi 4 bits of at}
a: a2=sh*8; {get sh bit ready for subtracting}
x: sp=a1-a2;
a: a1=at/16*16; {partial calc to strip off hi 4 bits of at}
x: ep=at-a1; {ending proportional position}
g; {character data}
ESL; {end character search, character loaded.}
j 8:1,eq,1; {go get next char}
L 12; {end of file reached}
#:**,"Font loaded.";
KT; {start input font trailer.}
ET; {end font trailer.}
KS; {start search for an input character.}
z 10:fs-fp;
L 9;
u: zz;
j 9: zz,ne,$1b; {look for esc}
u: zz;
j 9: zz,ne,$26; {look for x'26'}
u: zz;
j 9: zz,ne,$00; {look for 0 }
d: zc; {decimal code of character}
$: zc,"Encountered code (hex): ";
#: fp,"At file position: ";
j 9: zc,ne,cc;
# : cc,"Found code (dec)";
j 1: 1,eq,1; {found, go get it}
L 10; {char not found}
ESU; {end character search program (unsuccessful search)}
KO; {start output font header.}
L 88; {for download}
#:**, "Sending Font Header ";
u:$1b; {this starts rom cg copy to initialize char set to default}
y:":";
u:$00;
u:$00;
u:$00;
EO; {end output font header.}
a:cc=0; {start with first possible code, zero}
c; {select first valid code}
j 57:1,eq,1; {bypass first code check}
L 55;
c; {select first valid code}
j 59:cc,eq,0; {go to 59 if no more valid codes}
L 57;
KC; {start output character.}
$ :cc,"Sending code (hex): ";
u:$1b;
u:$26;
u:$00;
u: cc; {decimal code of character}
u: cc; {decimal code of character}
a: a1=sh*128; {set hi bit of attribute data}
a: a2=sp*16; {set starting point, bits 1-3 of attribute data}
u: a1+a2+ep; {output attribute data byte}
j 4: ch,gt,8; {can only output a char height of 8 bits}
g; {character data}
j 5: 1,eq,1;
L 4; {outputs every other byte of character data, assume ch=9}
{this will strip off lowest line of character, if it exists}
{recommended to shift up any downshifted character on design screen}
g;0,1;
g;2,1;
g;4,1;
g;6,1;
g;8,1;
g;10,1;
g;12,1;
g;14,1;
g;16,1;
g;18,1;
g;20,1;
L 5;
EC; {end output character.}
a:cc=cc+1;
j 55:1,eq,1;
L 59; {end}
KZ; {start output font trailer.}
j 89:d8,eq,1; {go finish download if downloading}
ET; {end font trailer.}
KP; {start download}
a:d8=1; {downloading indicator}
j 88: 1,eq,1; {go save font to the printer}
L 89; {now select download char set}
a:d8=0; {turn off download indicator}
u:$1b;
u:$25;
u:$01;
u:$00;
EP; {end download}
.